﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OblivionLevelingHelper.Attributes;
using OblivionLevelingHelper.Classes.Specializations;
using OblivionLevelingHelper.Skills;

namespace OblivionLevelingHelper.Classes
{
    public class Class
    {
        public Specialization Specialization;
        protected Dictionary<SkillTypes, bool> MajorSkills;
        public string Name = "Custom";
        public AttributeTypes FavoredAttributeOne;
        public AttributeTypes FavoredAttributeTwo;

        protected Class()
        {
            Specialization = new Combat(); // Default specialization
            MajorSkills = new Dictionary<SkillTypes, bool>();
        }

        protected void AddMajorSkill(SkillTypes skillType)
        {
            MajorSkills.Add(skillType, true);
        }

        public bool HasMajorSkill(SkillTypes skillType)
        {
            return MajorSkills.ContainsKey(skillType) && MajorSkills[skillType];
        }

        public bool HasFavoredAttribute(AttributeTypes attributeTypes)
        {
            return FavoredAttributeOne == attributeTypes || FavoredAttributeTwo == attributeTypes;
        }
        
        public List<SkillTypes> GetMajorSkillTypes()
        {
            return MajorSkills.Keys.ToList();
        }
    }
}
